package org.nanotek.mongodb;

import com.mongodb.MongoClient;
import com.mongodb.MongoException;
import com.mongodb.WriteConcern;
import com.mongodb.DB;
import com.mongodb.DBCollection;
import com.mongodb.BasicDBObject;
import com.mongodb.DBObject;
import com.mongodb.DBCursor;
import com.mongodb.ServerAddress;

import java.net.UnknownHostException;
import java.util.Arrays;

public class NanotekMongoClient {

	public NanotekMongoClient() {
		
	}
	
	public static void main(String[] args)
	{ 
		try {
			MongoClient mongoClient = new MongoClient( "localhost" );
			DB db = mongoClient.getDB("new_db");
			System.out.println(db.getName());
		} catch (UnknownHostException e) {
			e.printStackTrace();
		}
	}

}
